package com.bonjour.work.dto;

import com.bonjour.work.dto.interfaces.IResumeDetail;

import java.util.ArrayList;
import java.util.List;

public class StandardResume implements IResumeDetail {
    private String name;
    private String gender;
    private String birth;
    private String email;
    private String phoneNumber;
    private String selfMark;
    private String interest;
    private Integer experienceMonths;
    private Integer highestDegree;
    private Integer expectSalaryFrom;
    private String expectLocation;
    private boolean isOnWork;
    private List<StandardEducation> educations;
    private List<StandardWork> works;
    private List<StandardProject> projects;

    public static class StandardCycle implements IResumeCycle{
        private String startDate;
        private String EndDate;
        @Override
        public String getStartDate() {
            return startDate;
        }

        public void setStartDate(String startDate) {
            this.startDate = startDate;
        }

        @Override
        public String getEndDate() {
            return EndDate;
        }

        public void setEndDate(String endDate) {
            EndDate = endDate;
        }
    }
    public static class StandardEducation implements IResumeEducation{
        private String university;
        private String major;
        private Integer degree;
        private StandardCycle cycle;

        @Override
        public String getUniversity() {
            return university;
        }

        public void setUniversity(String university) {
            this.university = university;
        }

        @Override
        public String getMajor() {
            return major;
        }

        public void setMajor(String major) {
            this.major = major;
        }

        @Override
        public Integer getDegree() {
            return degree;
        }

        public void setDegree(Integer degree) {
            this.degree = degree;
        }

        public void setCycle(StandardCycle cycle) {
            this.cycle = cycle;
        }

        @Override
        public String getStartDate() {
            return cycle.getStartDate();
        }

        @Override
        public String getEndDate() {
            return cycle.getEndDate();
        }

        public void setEndDate(String endDate) {
            cycle.setEndDate(endDate);
        }
    }
    public static class StandardProject implements IResumeProject{
        private String company;
        private String title;
        private String desc;
        private StandardCycle cycle;

        @Override
        public String getCompany() {
            return company;
        }

        public void setCompany(String company) {
            this.company = company;
        }

        @Override
        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        @Override
        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public StandardCycle getCycle() {
            return cycle;
        }

        public void setCycle(StandardCycle cycle) {
            this.cycle = cycle;
        }

        @Override
        public String getStartDate() {
            return cycle.getStartDate();
        }

        @Override
        public String getEndDate() {
            return cycle.getEndDate();
        }
    }
    public static class StandardWork implements IResumeWork{
        private String company;
        private String title;
        private String responsibility;
        private Integer salary;
        private String departureReason;
        private String supervisor;
        private String area;
        private StandardCycle cycle;

        @Override
        public String getCompany() {
            return company;
        }

        public void setCompany(String company) {
            this.company = company;
        }

        @Override
        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        @Override
        public String getResponsibility() {
            return responsibility;
        }

        public void setResponsibility(String responsibility) {
            this.responsibility = responsibility;
        }

        @Override
        public Integer getSalary() {
            return salary;
        }

        public void setSalary(Integer salary) {
            this.salary = salary;
        }

        @Override
        public String getDepartureReason() {
            return departureReason;
        }

        public void setDepartureReason(String departureReason) {
            this.departureReason = departureReason;
        }

        @Override
        public String getSupervisor() {
            return supervisor;
        }

        public void setSupervisor(String supervisor) {
            this.supervisor = supervisor;
        }

        @Override
        public String getArea() {
            return area;
        }

        public void setArea(String area) {
            this.area = area;
        }

        public StandardCycle getCycle() {
            return cycle;
        }

        public void setCycle(StandardCycle cycle) {
            this.cycle = cycle;
        }

        @Override
        public String getStartDate() {
            return cycle.getStartDate();
        }

        @Override
        public String getEndDate() {
            return cycle.getEndDate();
        }
    }
    @Override
    public List<IResumeEducation> getEducations() {
        List<IResumeEducation> list = new ArrayList<>();
        educations.forEach(edu->{
            list.add(edu);
        });
        return list;
    }

    @Override
    public List<IResumeWork> getWorks() {
        List<IResumeWork> list = new ArrayList<>();
        works.forEach(w->{
            list.add(w);
        });
        return list;
    }

    @Override
    public List<IResumeProject> getProjects() {
        List <IResumeProject> list = new ArrayList<>();
        projects.forEach(p->{
            list.add(p);
        });
        return list;
    }

    @Override
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Override
    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    @Override
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    @Override
    public String getSelfMark() {
        return selfMark;
    }

    public void setSelfMark(String selfMark) {
        this.selfMark = selfMark;
    }

    @Override
    public String getInterest() {
        return interest;
    }

    public void setInterest(String interest) {
        this.interest = interest;
    }

    @Override
    public Integer getExperienceMonths() {
        return experienceMonths;
    }

    public void setExperienceMonths(Integer experienceMonths) {
        this.experienceMonths = experienceMonths;
    }

    @Override
    public Integer getHighestDegree() {
        return highestDegree;
    }

    public void setHighestDegree(Integer highestDegree) {
        this.highestDegree = highestDegree;
    }

    @Override
    public Integer getExpectSalaryFrom() {
        return expectSalaryFrom;
    }

    @Override
    public Integer getExpectSalaryTo() {
        return null;
    }

    public void setExpectSalaryFrom(Integer expectSalaryFrom) {
        this.expectSalaryFrom = expectSalaryFrom;
    }

    @Override
    public String getExpectLocation() {
        return expectLocation;
    }

    @Override
    public Boolean IsOnWork() {
        return null;
    }

    public void setExpectLocation(String expectLocation) {
        this.expectLocation = expectLocation;
    }

    public boolean isOnWork() {
        return isOnWork;
    }

    public void setOnWork(boolean onWork) {
        isOnWork = onWork;
    }

    public void setEducations(List<StandardEducation> educations) {
        this.educations = educations;
    }
}
